import grpc
from kea2 import kea2_pb2_grpc, kea2_pb2
from google.protobuf import empty_pb2

def run():
    channel = grpc.insecure_channel("localhost:50051")
    stub = kea2_pb2_grpc.Kea2ControlServiceStub(channel)

    resp = stub.Init(
        kea2_pb2.InitRequest(
            device_serial="23E0224307001843",
            root_dir="/Users/atria/Desktop/coding/hypiumKea/Kea2/hypiumtests",
        )
    )
    print(resp)

    print(stub.Start(empty_pb2.Empty()))

    print(stub.ExecuteProp(empty_pb2.Empty()))
    print(stub.ExecuteProp(empty_pb2.Empty()))

if __name__ == "__main__":
    run()